package cc.eddic.practice.spring.dto;

import cc.eddic.practice.spring.Gender;
import cc.eddic.practice.spring.domain.Student;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class StudentAddRequest {
    private String name;
    private Gender gender;
    private String major;

    public Student as() {
        return new Student(this.name, this.gender, this.major);
    }
}
